<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改个人资料</title>
    <link rel="stylesheet" href="/assets/index/css/profile.css">
    <link href="/assets/index/css/MyCenter.css" rel="stylesheet" />
    <style>
        .form .item {
            padding: 13px 0;
            flex-direction:column;
        }

        .user {
            padding: 30px;
        }
    </style>
</head>
<body>
    <div class="top_div">
        <img src="/assets/index/images/bac.jpg" class="top_img">
        <div class="userInfo">
            <img class="uPic" src="/assets/index/images/pexels-spencer-selover-428364.jpg" /><br /></a>
            <br />
            <p class="uBalance" style="color: rgb(74, 70, 66); ">
                {$Think.cookie.LoginUser['nickname']?$Think.cookie.LoginUser['nickname']:$Think.cookie.LoginUser['mobile']}
            </p>
        </div>
    </div>
    <div class="form">
        <form method="post">
            <div class="item">
                <div class="title" style="text-align: left;">
                    昵称：
                </div>
                <input type="text" name="nickname" placeholder="默认昵称为手机号"
                    value="{$user['nickname']?$user['nickname']:''}" </div>
                <div class="item">
                    <div class="title" style="text-align: left;">
                        修改密码：
                    </div>
                    <input type="password" name="password" placeholder="空则不修改" style="border:0px ;">
                </div>
                <div class="item">
                    <div class="title" style="text-align: left;">
                        性别：
                    </div>
                    <div class="sex">
                        <select name="gender" style="border: 0px;width:21.9em;">
                            <option {$user['gender']==0 ? 'selected' : '' } value="0">保密</option>
                            <option {$user['gender']==1 ? 'selected' : '' } value="1">男</option>
                            <option {$user['gender']==2 ? 'selected' : '' } value="2">女</option>
                        </select>
                    </div>
                </div>
                <div class="item">
                    <div class="title" style="text-align: left;">邀请码：</div>
                    <input type="text" disabled value="{$user['invitecode']}" />
                </div>

                <div class="item" style="position:relative;">
                    <div class="title" style="text-align: left;">地区：
                    </div>
                    <input id="city" type="text" name="region" readonly data-toggle="city-picker" size="100"
                        value="{$user['address']?$user['address']:''}" />
                </div>

                <form method="post" action="{:url('/index/business.business/avatar')}">
                    <div class="item">
                        <div class="title" style="text-align: left;">头像：</div>

                        <input type="file" id="file" name="avatar" />

                        <img style="width:100px;height:100px;" src="{$user['avatar']?$user['avatar']:''}" onclick="file.click()" />
                    </div>

                </form>

                <input type="submit" value="修改资料" style="background-color: #674c3b; color: white;">
        </form>
    </div>
</body>

</html>
<script src="/assets/index/js/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="/assets/index/city/css/city-picker.css" />
<script src="/assets/index/city/js/city-picker.data.min.js"></script>
<script src="/assets/index/city/js/city-picker.min.js"></script>

<script>
    $("#city").citypicker({
        province: '{$Think.cookie.LoginUser.province}',
        city: '{$Think.cookie.LoginUser.city}',
        district: '{$Think.cookie.LoginUser.district}'
    })

</script>